package com.lh.java.basic.rmi;


import java.net.MalformedURLException;
import java.rmi.Naming;
import java.rmi.NotBoundException;
import java.rmi.RMISecurityManager;
import java.rmi.RemoteException;

public class RMIClient {	
	public static void main(String[] args) throws MalformedURLException, RemoteException, NotBoundException {
//	    System.setSecurityManager(new   RMISecurityManager());//如果服务器和客户端不再同一台机器要加这行
	    AddServer hello=(AddServer) Naming.lookup("hello");
	    hello.sayHello();
	    System.out.println(hello.AddNumbers(5, 20));
	}

}
